package com.example.smart.pojo;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;
@Data
@NoArgsConstructor
@AllArgsConstructor
@Schema(name = "操作日志")
public class Log {
    @Schema(description = "日志编号")
    @TableId(type = IdType.AUTO)
    private Integer logId;
    @Schema(description = "模块标题")
    private String moduleTitle;
    @Schema(description = "业务类型（0其它 1新增 2修改 3删除）")
    private Integer businessType;
    @Schema(description = "操作人员")
    private String operName;
    @Schema(description = "请求ip地址")
    private String requestIp;
    @Schema(description = "请求地址")
    private String requestUrl;
    @Schema(description = "请求方式")
    private String requestMethod;
    @Schema(description = "操作方法")
    private String operMethod;
    @Schema(description = "请求参数")
    private String requestParameters;
    @Schema(description = "返回方法")
    private String returnParameters;
    @Schema(description = "日志状态（0正常 1异常）")
    private Integer logStatus;
    @Schema(description = "错误消息")
    private String errorMsg;
    @Schema(description = "消耗时间")
    private Integer elaspedTime;
    @Schema(description = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;
}
